<?php
  require_once('tpl/header.php');
?>
 <?php 
    
    require_once('../system/loginCheck.php');
    require_once('../system/dbConn.php');
connect();
    ?>
    <h1>欢迎管理员<?php echo $_SESSION["adminname"]; ?>使用本系统</h1>
    <?php
    $uid=$_GET["uid"];
    $sql="select * from users where uid={$uid}";
    $result=mysql_query($sql);
    $row=mysql_fetch_assoc($result);
      ?>
    <form action="doUserUpdate.php" method="post" enctype="multipart/form-data">
    	<input type="hidden" name="uid" value="<?php echo $row['uid']; ?>" >
    	<table class="table table-bordered">
   	     	<tr>
   	     		<td>
   	     		    用户名
   	     		</td>
   	     		<td>
   	     			<input type="text" name="username"  value="<?php echo $row["uname"];?>">
   	     		</td>
   	     	</tr>
   	        <tr>
   	     		<td>性别</td>
   	     		<td>
   	     			<input  type="radio" name="gender" value="0" <?php if ($row["gender"]==0) {
   	     				echo "checked";
   	     			} ?> >男
   	     		    <input type="radio" name="gender"
   	     		      value="1" <?php 
   	     		      if ($row["gender"]==1) {
   	     		       	echo "checked";
   	     		       } ?>>女
   	     		</td>
   	     	</tr>
   	     	<tr>
   	     		<td>生日</td>
   	     		<td>
   	     			<input type="date" name="birthdate" value="<?php echo $row["birthdate"];?>">
   	     		</td>
   	     	</tr>
   	     	<tr>
   	     		<td>头像</td>
   	     		<td>
   	     		<input type="file" name="pic">原头像<img class="img-circle" src="../images/<?php echo $row["pic"]; ?>"  width="200px" height="200px">
   	     		</td>
   	     	</tr>
   	     	<tr>
   	     		<td>邮箱</td>
   	     		<td>
   	     			<input type="email"  name="email" value="<?php echo $row["email"]; ?>">
   	     		</td>
   	     	</tr>
   	     	<tr>
   	     		<td  colspan="2">
   	     			<input type="submit" value="更新">
   	     		</td>
   	     	</tr>
    	</table>
    </form>

   


<?php
  require_once('tpl/footer.php');
?>